package com.coolingme.logger;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * jsonLogger 装饰器测试
 *
 * @author wangyue
 * @date 2020/9/16 10:01
 */
public class LoggerTest {

    /**
     * 普通的Logger
     */
    private static final Logger LOGGER = LoggerFactory.getLogger(LoggerTest.class);

    /**
     * JSON格式的logger
     */
    private static final JsonLogger JSON_LOGGER = JsonLoggerFactory.getLogger(LoggerTest.class);

    public static void main(String[] args) {
        LOGGER.info("普通的日志");
        LOGGER.error("普通的日志");

        System.out.println("-------------------------------");

        JSON_LOGGER.info("普通的日志");
        JSON_LOGGER.error("普通的日志");
        JSON_LOGGER.error(new RuntimeException("运行时异常"));
    }

}
